/*
 *http://www.apache.org/licenses/LICENSE-2.0
 *Copyright (c) 2021 fullset
 *@ClassName SysMenuServiceImpl
 *@date 2021/6/5 11:17
 *@Description TODO
 */
package com.fs.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fs.base.service.SysMenuService;

import com.fs.orm.dao.SysMenuDao;
import com.fs.orm.entity.SysMenu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysMenuServiceImpl implements SysMenuService {

    @Autowired
    private SysMenuDao sysMenuDao;

    @Override
    public boolean logicalDeleteById(String id) {
        return sysMenuDao.logicalDeleteById(id);
    }

    @Override
    public List<SysMenu> getAll() {
        return sysMenuDao.getList(null);
    }

    @Override
    public List<SysMenu> getList() {
        QueryWrapper qWrapper = new QueryWrapper();
        qWrapper.eq("is_deleted", 0);
        return sysMenuDao.getList(qWrapper);
    }
}
